/**
 * 
 */
package org.softTank.BC.service.services;

import java.util.List;

import org.hibernate.SessionFactory;
import org.softTank.BC.dao.OperationDao;
import org.softTank.BC.dao.PortTypeDao;
import org.softTank.BC.dao.RoleDao;
import org.softTank.BC.dao.TypeDao;
import org.softTank.BC.entity.services.Operation;
import org.softTank.BC.entity.services.PortType;
import org.softTank.BC.entity.services.Role;
import org.softTank.BC.entity.services.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Yuzone
 *
 */
@Service
@Transactional
public class ServiceManager {

	@Autowired
	private TypeDao typeDao;
	@Autowired
	private OperationDao operationDao;
	@Autowired
	private RoleDao roleDao;
	@Autowired
	private PortTypeDao portTypeDao;
	@Autowired
	private SessionFactory sessionFactory;

	public List<Type> getAllInfo() {
		List<Type> typeList = typeDao.getAll("id", true);

		return typeList;
	}

	public Operation getOperation(Long id) {
		return operationDao.get(id);
	}

	public Role getRole(Long id) {
		return roleDao.get(id);
	}

	public PortType getPortType(Long id){
		return portTypeDao.get(id);
	}
}
